var swiper = new Swiper(".mySwiper", {
    loop: true, // 循环模式选项
    pagination: {
        el: ".swiper-pagination",
    },
    autoplay: {
        delay: 2500,  // 多长时间进行一次自动切换
        disableOnInteraction: false,  // 用户点击一次后是否取消自动切换 默认true
    },
});

// 滚动条滚动事件
let header = document.querySelector("header")
let previous = document.querySelector(".icon-previous")
window.addEventListener("scroll", function () {
    header.style.color = '#000';
    header.style.backgroundColor = "#f4f4f4"
    previous.style.color = "#545454"
    // 判断滚动条的高度
    if (document.documentElement.scrollTop === 0) {
        header.style.color = '#fff';
        header.style.backgroundColor = "transparent"
        previous.style.color = "#fff"
    }
})